package com.hsck.order.kds.login.adapter

import android.view.View
import androidx.annotation.LayoutRes
import com.hsck.order.kds.R
import com.hsck.order.kds.base.common.BaseAdapter
import com.hsck.order.kds.base.common.BaseViewHolder
import com.hsck.order.kds.base.common.setSpannableString
import kotlinx.android.synthetic.main.item_login.view.*


class LoginAdapter(@LayoutRes layoutId: Int) : BaseAdapter<Boolean>(layoutId) {

    override fun onBindViewHolder(holder: BaseViewHolder, data: Boolean) {
        if (data) {
            holder.itemView.tv_item_login_phone.setSpannableString(colorId = R.color.black21)
            holder.itemView.view_item_login.visibility = View.VISIBLE
        } else {
            holder.itemView.tv_item_login_phone.setSpannableString(colorId = R.color.gray8D)
            holder.itemView.view_item_login.visibility = View.GONE
        }

    }
}